Data Source Editor
Overview
The "Data Source Editor" is a powerful tool for manipulating data for
importing into Lotto Sorcerer. Although Lotto Sorcerer's importing functions
can handle a wide variety of input formats, still, most of the files from
lottery websites may still require some manipulation.
Invisible Encoded (Control) Character Handling
This "Data Source Editor" has tools that you will not be able to find on
standard text editors. For example, you can search for and replace invisible
encoded characters, such as the tab character and the line feed character.
Regular Expressions
Even more impressive, you can perform Regular Expression searches. Think of
Regular Expressions as a powerful form of wildcards. Regular search and
replace requires you to type in exactly what you are searching for (for
example, the date '1999/08/02'). But what if you wanted to search for all
dates, not just a specific date? This is where Regular Expressions come in.
Multiple Pass
This "Data Source Editor" lets you easily copy the output back to the input,
in the likely event that you need to do multiple search and replace
procedures to the the data source "just right" .
How to Invoke
Use the menu item "Lottery Data > Import Lottery Data > Import File Utilities > Data Source Editor" .
Basic Procedure
- Enter, paste, load or 'drag and drop' the text you want to parse into
the "Input" box
- If you are using Regular Expressions, choose the RegEx options in the
"RegEx Options" tab
- Choose either Regular Expressions or standard Search-and-Replace in
the "Parameters" tab, then click the "Process" button
- Send the Output back to the Input, if necessary, or save or copy the
results in the "Output" tab.
Window Controls
"Input" Tab
"Input" text box
Enter, paste or load the text you want to parse in this box.
"Clear" button
This button clears the Input text box.
"Paste" button
This button pastes any text in the System Clipboard into the Input text box.
"Load" button
This button opens up a standard file selector, letting you choose a text
file for the "Input" text box.
"RegEx Options" Tab
"Case Sensitive" check box
Check this box to treat uppercase and lowercase letters as different
characters.
"Dot Matches All" check box
Check this box to make the dot character match all characters, including
line break characters.
"Greedy" check box
Uncheck this box if you want quantifiers to be 'lazy', effectively making .*
the same as .*?.
"Match Empty Strings" check box
Uncheck this box if you want to skip zero-length matches.
"Replace All Matches" check box
Check this box if you want the engine to search-and-replace all regex
matches in the subject string rather than just the first one.
"String Begins = Line Begins" check box
Uncheck this box if you do not want the start of the string to be considered
the start of the line. This can be useful if you are processing a large chunk
of data as several separate strings, where only the first string should be
considered as starting the (conceptual) overall string.
"String Ends = Line Ends" check box
Uncheck this box if the string you're passing to the Search method isn't
really the end of the whole chunk of data you are processing.
"Treat Target as One Line" check box
Check this box to make the caret-and-dollar match at the start and the end
of the string only. By default, they will also match after and before
embedded line breaks.
"Line End" pop up menu
Select the line ending character used in the text you are parsing.
"Parameters" Tab
"Regular Expression/Standard Search-and-Replace" radio button
Choose the method you want to use.
"Encoded Control Characters" check box
If you are using the Standard Search-and-Replace mode, and if you want to
search for and/or replace encoded control characters, check this box.
If this option is checked, you can search for seven control characters. Just
prefix the appropriate control character with a backslash ('\'). Note that
these encodings are case sensitive:
Enter this |
To search for/replace |
ASCII code |
\r |
Carriage Return |
13 |
\n |
Line feed |
10 |
\t |
Tab |
9 |
\f |
Form feed |
12 |
\a |
Bell |
7 |
\b |
Backspace |
8 |
\e |
Escape |
27 |
\\ |
Backslash |
92 |
"Search for/RegEx" text box
Enter or paste the regular expression or search term here.
"Replace With" text box
If you chose "Standard Search and Replace" , enter or paste the regular
expression or search term here.
"Process" button
Click this button to start the parsing process.
Output Tab
"Output" text box
This contains the results of the parsing process.
"Send to Input" button
This sends the output (results) back to the input box so that you can
further parse the text.
"Clear" button
This button clears the Output box.
"Copy" button
This button copies the output to the System Clipboard.
"Save" button
This opens up a standard file selector, allowing you to save the output
(results) to a file on your computer.